package com.wushi.lenovo.asia5b.app_event;

import com.mvp.base.model.ResultModel;
import com.wushi.lenovo.asia5b.app_config.MemberBlanceRepository;
import com.wushi.lenovo.asia5b.app_config.OrderRepository;
import com.wushi.lenovo.asia5b.app_config.ShopRepository;
import com.wushi.lenovo.asia5b.app_model.credit.bean.TopupInfoBean;

/**
 * Created by zhangyuncai on 2020/3/17.
 * 订单支付成功
 */
public class OrderPayEvent {
    //todo 通过这个字段知道第一次付款还是二次付款,还是差价付款
    public TopupInfoBean topupInfoBean;

    public ResultModel resultModel;
    public OrderPayEvent(ResultModel resultModel) {
        this.resultModel = resultModel;
        if (resultModel.isSuccess()) {
            OrderRepository.updateOrderCount();
            ShopRepository.updateShopCount();
            MemberBlanceRepository.updateMemberBalance();
        }
    }
}
